package ru.cod.rs.main.units;

import ru.cod.rs.main.enums.Side;
import ru.cod.rs.main.types.LevelPreferences;

public abstract class SideUnit extends LiveUnit {

	protected Side side;

	public SideUnit(LevelPreferences cntx, Side s) {
		super(cntx);

		this.side = s;
		moveRight();

		if (side.equals(Side.ENEMY)) {
			setCoords(preferences.getRightEnd() - getWidth(),
					preferences.getGround());
			moveLeft();
		}
	}

	// /////////////////////////////////////////////
	/**
	 * @return the side
	 */
	public Side getSide() {
		return side;
	}

	/**
	 * @param side
	 *            the side to set
	 */
	public void setSide(Side side) {
		this.side = side;
	}

}
